<?php

class Zend_View_Helper_DisplayContent extends Zend_View_Helper_Abstract {

    protected $options = array(
        'class' => 'content-item',
        'id' => 'content-container',
        'items' => array(),
    );

    public function displayContent($options = array()) {

        $options = array_merge($this->options, $options);
        $r = '';

        foreach ($options['items'] as $key => $item) {

            $r .= '<div id="' . $options['id'] . '-' . $item['id'] . '" class="' . $options['class'] . '">';

            $r .= <<<HTML
        <h1>{$item['title']}</h1>
        <div>{$item['short']}</div>
        <div>{$item['body']}</div>
HTML;

            $r .= '<div class="cls"></div>
            </div>';
            if(count($options['items'])>1)
                $r .='<hr />';
        }
        return $r;
    }

}